<?php
// +----------------------------------------------------------------------
// | author: admin
// +----------------------------------------------------------------------

namespace app\adminapi\validate\travel;


use app\common\validate\BaseValidate;


/**
 * TravelAgency验证器
 * Class TravelAgencyValidate
 * @package app\adminapi\validate\travel
 */
class TravelAgencyValidate extends BaseValidate
{

     /**
      * 设置校验规则
      * @var string[]
      */
    protected $rule = [
        'id' => 'require',
        'licence' => 'require',
        'business_licence' => 'require',
        'contact_phone' => 'require',
        'contact_name' => 'require',
        'address' => 'require',
        'status' => 'require',
    ];


    /**
     * 参数描述
     * @var string[]
     */
    protected $field = [
        'name' => '旅行社名称',
        'licence' => '营业执照',
        'business_licence' => '经营许可证',
        'contact_phone' => '联系电话',
        'contact_name' => '联系人',
        'address' => '地址',
        'status' => '是否禁用',

    ];


    /**
     * @notes 添加场景
     * @return TravelAgencyValidate
     * @author admin
     * @date 2025/04/23 18:23
     */
    public function sceneAdd()
    {
        return $this->only(['name','licence','business_licence','contact_phone','contact_name','address','status']);
    }


    /**
     * @notes 编辑场景
     * @return TravelAgencyValidate
     * @author admin
     * @date 2025/04/23 18:23
     */
    public function sceneEdit()
    {
        return $this->only(['id','name','licence','business_licence','contact_phone','contact_name','address','status']);
    }


    /**
     * @notes 删除场景
     * @return TravelAgencyValidate
     * @author admin
     * @date 2025/04/23 18:23
     */
    public function sceneDelete()
    {
        return $this->only(['id']);
    }

    /**
     * @notes  更改状态场景
     * @return ArticleValidate
     */
    public function sceneStatus()
    {
        return $this->only(['id', 'status']);
    }

    /**
     * @notes 详情场景
     * @return TravelAgencyValidate
     * @author admin
     * @date 2025/04/23 18:23
     */
    public function sceneDetail()
    {
        return $this->only(['id']);
    }

}